package com.gimi.cloud.jimi.manage.consumer.feign;

import com.gimi.cloud.jimi.common.utils.reqhead.Response;
import com.gimi.cloud.jimi.dto.params.*;
import com.gimi.cloud.jimi.dto.prod.ProdCategoryDTO;
import com.gimi.cloud.jimi.dto.product.LogisticsCompanyDTO;
import com.gimi.cloud.jimi.dto.sys.SysAuthorityDTO;
import com.gimi.cloud.jimi.dto.sys.SysConfigDTO;
import com.gimi.cloud.jimi.dto.sys.SysMasterDTO;
import com.gimi.cloud.jimi.dto.sys.SysMenuDTO;
import feign.Headers;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by shazhiwei on 2017/12/14.
 */
@FeignClient(name = "jimi-manage-service")
public interface SystemFeignService {

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/add", method = RequestMethod.POST)
    Response addMaster(@RequestBody AddMasterParams params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/edit", method = RequestMethod.POST)
    Response editMaster(@RequestBody AddMasterParams params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/delete", method = RequestMethod.POST)
    Response deleteMaster(@RequestBody DeleteMasterParams params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/login", method = RequestMethod.POST)
    Response login(@RequestBody LoginParams loginVo);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/loginOut", method = RequestMethod.POST)
    Response loginOut(@RequestBody SysMasterDTO sysMasterDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "role/list", method = RequestMethod.POST)
    Response getRoleList(String requestBody);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "role/single", method = RequestMethod.POST)
    Response getRoleSingle(RoleSingleParams requestBody);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "role/add", method = RequestMethod.POST)
    Response addRole(ModifySysRoleParam param);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "role/edit", method = RequestMethod.POST)
    Response editRole(ModifySysRoleParam param);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "role/pageList", method = RequestMethod.POST)
    Response getRolePageList(RoleListParams requestBody);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/list", method = RequestMethod.POST)
    Response getList(MasterListParams requestBody);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/single", method = RequestMethod.POST)
    Response getMasterSingle(MasterSingleParams params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "auth/list", method = RequestMethod.POST)
    Response getAuthList(SysAuthorityDTO sysAuthorityDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "auth/doAuth", method = RequestMethod.POST)
    Response doAuth(SysAuthorityDTO sysAuthorityDTO);

    /***菜单操作开始***/
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "menu/list", method = RequestMethod.POST)
    Response getMenuList(SysMenuDTO menuDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "menu/single", method = RequestMethod.POST)
    Response menuSingle(MenuSingleParams params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "menu/add", method = RequestMethod.POST)
    Response menuAdd(SysMenuDTO menuDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "menu/update", method = RequestMethod.POST)
    Response menuUpdate(SysMenuDTO menuDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "menu/delete", method = RequestMethod.POST)
    Response menuDelete(SysMenuDTO menuDTO);
    /***菜单操作结束***/
	/**
     * 系统配置文件操作
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "config/list", method = RequestMethod.POST)
    Response getConfigList(SysConfigDTO configDTO);
    
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "config/pageList", method = RequestMethod.POST)
    Response getConfigPageList(SysConfigDTO configDTOJson);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "config/add", method = RequestMethod.POST)
    Response addConfig(SysConfigDTO configDTO);
    
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "config/single", method = RequestMethod.POST)
    Response getConfigSingle(SysConfigDTO configDTO);
    
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "config/update", method = RequestMethod.POST)
    Response configUpdate(SysConfigDTO configDTO);
    
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "config/delete", method = RequestMethod.POST)
    Response deleteConfig(SysConfigDTO configDTO);
    
    
    /***商品品类操作开始***/
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/list", method = RequestMethod.POST)
    String getCategoryList(ProdCategoryDTO categoryDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/add", method = RequestMethod.POST)
    String categoryAdd(ProdCategoryDTO categoryDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/update", method = RequestMethod.POST)
    String categoryUpdate(ProdCategoryDTO categoryDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/delete", method = RequestMethod.POST)
    String categoryDelete(ProdCategoryDTO categoryDTO);
    /***商品品类操作结束***/


}
